package com.fm.core;

import lombok.extern.slf4j.Slf4j;

import java.net.Socket;

import static com.fm.service.service_ListFile.ListFile;
import static com.fm.service.service_download.download;
import static com.fm.service.service_upload.UpLoadFile;

@Slf4j
public class core {

    /**
     * 中转
     *
     * @param num
     * @param socket
     */
    public static void SelectAction(String num, Socket socket) {
        switch (num) {

            // 获取列表
            case "1":
                ListFile(socket);
                break;

            // 下载
            case "2":
                download(socket);
                break;

            //上传
            case "3":
                UpLoadFile(socket);
                break;

            default:
                log.info("输入错误!");

        }
    }


}
